public  class j2023625 {
     static class Person {
         String name;
         String gender;
         int age;

         public Person(String name, String gender, int age) {
             this.name = name;
             this.gender = gender;
             this.age = age;
         }

         public String toString() {
             return "["+name+" "+gender+" "+age+"]";
         }
     }
        //如果想要默认打印对象中的属性该如何处理呢？答案：重写toString方法即可。
        public static void main(String[] args) {
            Person person = new Person("Jim","男", 18);
            System.out.println(person);
        }
    }



